package com.kk.repository;


import com.kk.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author: kevin
 * @date: 2018-10-14 17:03
 */
public interface UserRrepository extends JpaRepository<User, String> {

    User findByAccount(String account);

    @Query("select u from User u where u.name like %?1% or u.account like %?1%")
    List<User> findByNameLike(String name);


}
